package com.example.projectmanagement.dto;

import lombok.Data;
import java.util.List;

@Data
public class LoginResponse {
    private String token;
    private UserInfo userInfo;

    public LoginResponse(String token, UserInfo userInfo) {
        this.token = token;
        this.userInfo = userInfo;
    }

    @Data
    public static class UserInfo {
        private Long id;
        private String username;
        private String name;
        private String department;
        private List<String> roles;
        private String avatar;

        public UserInfo(Long id, String username, String name, String department, List<String> roles, String avatar) {
            this.id = id;
            this.username = username;
            this.name = name;
            this.department = department;
            this.roles = roles;
            this.avatar = avatar;
        }
    }
}